
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml" lang="tr">
  <head>
    <meta charset="utf-8" />
    <title>Sıfırdan Milis Linux Yapımı &#8212; Milis Linux Belgeler  belgelendirme çalışması</title>
    <link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    <script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <script type="text/javascript" src="../../_static/language_data.js"></script>
    <script type="text/javascript" src="../../_static/translations.js"></script>
    <link rel="index" title="Dizin" href="../../genindex.html" />
    <link rel="search" title="Ara" href="../../search.html" />
    <link rel="next" title="Mps ile Milis Linux Yapımı" href="mps_ile_iso_yapimi.html" />
    <link rel="prev" title="Milis Paket Sistemi" href="mps.html" />
   
  <link rel="stylesheet" href="../../_static/custom.css" type="text/css" />
  
  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />

  </head><body>
  

    <div class="document">

      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="sifirdan-milis-linux-yapimi">
<h1>Sıfırdan Milis Linux Yapımı<a class="headerlink" href="#sifirdan-milis-linux-yapimi" title="Bu başlığın kalıcı bağlantısı">¶</a></h1>
<div class="toctree-wrapper compound">
</div>
<div class="admonition warning">
<p class="admonition-title">Uyarı</p>
<p>Test aşamasındadır. Lütfen kullanmayınız!</p>
</div>
<ol class="arabic simple" start="0">
<li><p>Önsistemi oluşturmak için gerekli paketler kurulur:</p></li>
</ol>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># Milis</span>
mps kur lua <span class="o">(</span>luafileystem kaynak kodundan derlenecek.<span class="o">)</span>
<span class="c1"># ------------------------</span>
<span class="c1"># Arch</span>
pacman -S base-devel
pacman -S bison
pacman -S libarchive
pacman -S lua
pacman -S lzip
pacman -S squashfs-tools
pacman -S xorriso
<span class="c1"># ------------------------</span>
<span class="c1">#  Ubuntu ve türevleri için</span>
apt install build-essential
apt install bison
apt install bsdtar
apt install lua5.3
apt install liblua5.3
apt install lzip
apt install squashfs-tools
apt install xorriso
</pre></div>
</div>
<ol class="arabic simple">
<li><p>Yetkili komut satırına geçerek Milis LFS kullanıcı dizinlerini ayarlanır:</p></li>
</ol>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo su

groupadd mlfs
useradd -s /bin/bash -g mlfs -m -k /dev/null mlfs
passwd mlfs
</pre></div>
</div>
<ol class="arabic simple" start="2">
<li><p>Milis 2.0 deposu klonlanıp önsistem için gerekli dizinler oluşturulur:</p></li>
</ol>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>git clone https://notabug.org/milislinux/milis19 /home/mlfs/milis
git clone https://notabug.org/milislinux/mps /home/mlfs/mps

cp /home/mlfs/milis/bashrc-onsistem.temp /home/mlfs/.bashrc
cp /home/mlfs/milis/bash_profile.temp /home/mlfs/.bash_profile

mkdir -p /home/mlfs/<span class="o">{</span>onsistem,sources<span class="o">}</span>
mkdir -p /home/mlfs/onsistem/tools
ln -sv /home/mlfs/onsistem/tools /
ln -sv /home/mlfs/sources /

chown -R mlfs:mlfs /home/mlfs
</pre></div>
</div>
<ol class="arabic simple" start="3">
<li><p>Önsistemi oluşturmayı başlatmak için mlfs kullanıcısıyla giriş yapılır:</p></li>
</ol>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>su - mlfs

<span class="nb">source</span> ~/.bash_profile
</pre></div>
</div>
<ol class="arabic simple" start="4">
<li><p>İzin ve ortam değişkenleri kontrol edilir:</p></li>
</ol>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>mlfs@makine1:~$ ls -al

drwxr-xr-x <span class="m">7</span> mlfs mlfs <span class="m">4096</span> May  <span class="m">5</span> <span class="m">15</span>:09 .
drwxr-xr-x <span class="m">4</span> root root <span class="m">4096</span> May  <span class="m">5</span> <span class="m">14</span>:32 ..
-rw------- <span class="m">1</span> mlfs mlfs  <span class="m">166</span> May  <span class="m">5</span> <span class="m">15</span>:17 .bash_history
-rw-r--r-- <span class="m">1</span> mlfs mlfs   <span class="m">59</span> May  <span class="m">5</span> <span class="m">14</span>:55 .bash_profile
-rwxr-xr-x <span class="m">1</span> mlfs mlfs  <span class="m">327</span> May  <span class="m">5</span> <span class="m">15</span>:17 .bashrc
drwxr-xr-x <span class="m">4</span> mlfs mlfs <span class="m">4096</span> May  <span class="m">5</span> <span class="m">15</span>:15 milis
drwxr-xr-x <span class="m">2</span> mlfs mlfs <span class="m">4096</span> May  <span class="m">5</span> <span class="m">15</span>:06 mps
drwxr-xr-x <span class="m">3</span> mlfs mlfs <span class="m">4096</span> May  <span class="m">5</span> <span class="m">15</span>:06 onsistem
drwxr-xr-x <span class="m">2</span> mlfs mlfs <span class="m">4096</span> May  <span class="m">5</span> <span class="m">15</span>:09 sources

mlfs@makine1:~$ <span class="nb">export</span>
<span class="nb">declare</span> -x <span class="nv">HOME</span><span class="o">=</span><span class="s2">&quot;/home/mlfs&quot;</span>
<span class="nb">declare</span> -x <span class="nv">LC_ALL</span><span class="o">=</span><span class="s2">&quot;POSIX&quot;</span>
<span class="nb">declare</span> -x <span class="nv">MILIS_HOME</span><span class="o">=</span><span class="s2">&quot;/home/mlfs&quot;</span>
<span class="nb">declare</span> -x <span class="nv">MILIS_REPO</span><span class="o">=</span><span class="s2">&quot;/home/mlfs/milis&quot;</span>
<span class="nb">declare</span> -x <span class="nv">MPS_NOROOT</span><span class="o">=</span><span class="s2">&quot;yes&quot;</span>
<span class="nb">declare</span> -x <span class="nv">MPS_PATH</span><span class="o">=</span><span class="s2">&quot;/home/mlfs/mps&quot;</span>
<span class="nb">declare</span> -x OLDPWD
<span class="nb">declare</span> -x <span class="nv">ONSISTEM_CHROOT</span><span class="o">=</span><span class="s2">&quot;/home/mlfs/onsistem&quot;</span>
<span class="nb">declare</span> -x <span class="nv">ONSISTEM_TARGET</span><span class="o">=</span><span class="s2">&quot;x86_64-milis-linux-gnu&quot;</span>
<span class="nb">declare</span> -x <span class="nv">PATH</span><span class="o">=</span><span class="s2">&quot;/home/mlfs/mps/bin:/tools/bin:/usr/local/bin:/bin:/sbin:/usr/sbin:/usr/bin:/root/bin&quot;</span>
<span class="nb">declare</span> -x <span class="nv">PS1</span><span class="o">=</span><span class="s2">&quot;\${debian_chroot:+(\$debian_chroot)}\\u@\\h:\\w\\\$ &quot;</span>
<span class="nb">declare</span> -x <span class="nv">PWD</span><span class="o">=</span><span class="s2">&quot;/home/mlfs&quot;</span>
<span class="nb">declare</span> -x <span class="nv">SHLVL</span><span class="o">=</span><span class="s2">&quot;1&quot;</span>
<span class="nb">declare</span> -x <span class="nv">TALIMATNAME</span><span class="o">=</span><span class="s2">&quot;/home/mlfs/milis/talimatname&quot;</span>
<span class="nb">declare</span> -x <span class="nv">TERM</span><span class="o">=</span><span class="s2">&quot;screen&quot;</span>
</pre></div>
</div>
<ol class="arabic simple" start="5">
<li><p>MPS önsistem için hazırlanıp, kontrol edilir:</p></li>
</ol>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span> ~/mps
bash derle.sh

mlfs@makine1:~/mps$ mps.lua -v
MPS <span class="m">2</span>.0.0 - Milis Paket Sistemi milisarge@gmail.com
</pre></div>
</div>
<ol class="arabic simple" start="6">
<li><p>Önsistem derlenmeye başlanır:</p></li>
</ol>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span> ~/milis
./01-onsistem.sh
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Not</p>
<p>Sertifika ilgili bir hata oluşursa,</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">export</span> <span class="n">WGET_GENEL_PARAM</span><span class="o">=</span><span class="s2">&quot;--no-check-certificate&quot;</span>
</pre></div>
</div>
<p>komutu derlemeden önce verilerek sertifika denetimi kapatılabilir.</p>
</div>
<p>7. Önsistem derlemesi Lua ile bittiğinde ve ‘talimatname/0/order’ dosyası içindeki paketlerin kurulduğundan
emin olunduktan sonra önsistem sıkıştırılarak yedeklenir:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>./onsistem_sfs.sh
</pre></div>
</div>
<ol class="arabic simple" start="8">
<li><p>Temel sistem paketlerinin hazırlanması için yeni derleme ortamına girilir:</p></li>
</ol>
<div class="admonition note">
<p class="admonition-title">Not</p>
<p>Temel sistem üretimi ertlenmek veya sfs kullanarak yapılmak istenirse:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>unsquashfs onsistem-tarih-saat-degeri.sfs
mv squashfs-root <span class="si">${</span><span class="nv">ONSISTEM_CHROOT</span><span class="si">}</span>
</pre></div>
</div>
</div>
<p>Buradan sonraki işlemler sudo yetkileri ile yapılmalıdır:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">exit</span>
<span class="nb">cd</span> /home/mlfs/milis
sudo su
bash --rcfile ../.bashrc

./02-enter-chroot-tools

<span class="c1"># aşağıdaki çıktıyı görmeniz gerekir.</span>
Chroot ortamı bağlanıyor...
mount: /dev bound on /home/mlfs/onsistem/dev.
mount: devpts mounted on /home/mlfs/onsistem/dev/pts.
mount: proc mounted on /home/mlfs/onsistem/proc.
mount: sysfs mounted on /home/mlfs/onsistem/sys.
mount: tmpfs mounted on /home/mlfs/onsistem/run.
temel sistem talimatları kopyalandı.
<span class="s1">&#39;/etc/ssl/certs/ca-certificates.crt&#39;</span> -&gt; <span class="s1">&#39;/home/mlfs/onsistem/tools/etc/ssl/certs/ca-certificates.crt&#39;</span>
<span class="s1">&#39;/etc/resolv.conf&#39;</span> -&gt; <span class="s1">&#39;/home/mlfs/onsistem/tools/etc/resolv.conf&#39;</span>
</pre></div>
</div>
<ol class="arabic simple" start="9">
<li><p>Temel sistem içine girildikten sonra ulaşılması gereken komut satırı:</p></li>
</ol>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="o">(</span>temel<span class="o">)</span> I have no name!:/#
</pre></div>
</div>
<ol class="arabic simple" start="10">
<li><p>Gerekli betikler çağrılarak sistem hazırlanmaya başlanır:</p></li>
</ol>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="o">(</span>temel<span class="o">)</span> I have no name!:/# <span class="m">03</span>-temel-dosya-sistemi-hazirla
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Not</p>
<p>Bu aşamada ulaşılması gerek komut satırı bu şekildedir:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>bash-5.0#
</pre></div>
</div>
</div>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>bash-5.0# <span class="m">04</span>-mps-hazirla
</pre></div>
</div>
<p>Bu aşamada mps’in doğru sürümünün kurulu olduğunu test etmek için:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>bash-5.0# mps.lua -v
MPS <span class="m">2</span>.0.0 - Milis Paket Sistemi milisarge@gmail.com
</pre></div>
</div>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>bash-5.0# <span class="m">05</span>-temel-sistemi-derle.sh
</pre></div>
</div>
<p>Bash derlenip kurulduktan sonra aşağıdaki çıktı ile derleme duracaktır:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># bash_refresh  komutu verip tekrar devam edin!</span>
</pre></div>
</div>
<p>Aşağıdaki komut verilerek, derleme yeni bash ile kaldığı yerden devam edecektir:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>bash-5.0# bash_refresh
bash-5.0# <span class="m">05</span>-temel-sistemi-derle.sh
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Not</p>
<p>Yeni bash ten sonra ortamdan çıkma durumu olursa yeniden ortam girmek için:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>./02.1-enter-chroot
bash-5.0# <span class="m">05</span>-temel-sistemi-derle.sh
</pre></div>
</div>
</div>
<ol class="arabic simple" start="11">
<li><p>Canlı(Live) imajda kullanmak üzere initramfs üretilir:</p></li>
</ol>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>dracut -N --force --xz --add <span class="s1">&#39;dmsquash-live pollcdrom&#39;</span> --omit systemd /boot/initramfs_live <span class="sb">`</span>ls /usr/lib/modules<span class="sb">`</span>
</pre></div>
</div>
<ol class="arabic simple" start="12">
<li><p>Temel sistem derlemesi bittikten sonra derleme logları ve temel sistem incelenir:</p></li>
</ol>
<p>Aşağıdaki komutların çıktıları olmamalı:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>bash-5.0# grep -l <span class="s1">&#39;compilation terminated&#39;</span> /tmp/*.log
bash-5.0# grep -l <span class="s1">&#39;.h: No such file or directory&#39;</span> /tmp/*.log

find /var/lib/mps -name kurulan -size <span class="m">0</span>

<span class="c1"># kırık linklerin kontrolü</span>
rm -rf /tools
find /usr -xtype l
</pre></div>
</div>
<p>Aşağıdaki komutun çıktısı ise ‘TM’ olmalı:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="o">[</span> <span class="sb">`</span>ls /var/lib/mps/db <span class="p">|</span> wc -l<span class="sb">`</span> -eq <span class="sb">`</span>cat /usr/milis/talimatname/1/order <span class="p">|</span> wc -l<span class="sb">`</span> <span class="o">]</span> <span class="o">&amp;&amp;</span> <span class="nb">echo</span> <span class="s2">&quot;TM&quot;</span>
</pre></div>
</div>
<ol class="arabic simple" start="13">
<li><p>Canlı imajda kullanmak üzere root şifresi oluşturulur: (Öntanımlı <strong>toor</strong>)</p></li>
</ol>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>passwd
</pre></div>
</div>
<ol class="arabic simple" start="14">
<li><p>Temel sistem gereksiz dosyalardan arındırılır ve sfs yedeklenir:</p></li>
</ol>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">exit</span>

<span class="nb">cd</span> /home/mlfs/milis
./temel_sfs.sh
</pre></div>
</div>
<ol class="arabic simple" start="15">
<li><p>Güncel MPS yüklenir ve gerekli ayarlamalar yapılır:</p></li>
</ol>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>cp onsistem/etc/bash.bashrc onsistem/root/.bashrc

<span class="nb">cd</span> /home/mlfs/mps
git pull

<span class="nb">cd</span> /home/mlfs
rm -rf onsistem/usr/milis/mps
cp -rf mps onsistem/usr/milis/

<span class="c1"># **temel sistemin içine tekrar gireriz**</span>
./02.1-enter-chroot
<span class="o">(</span>temel<span class="o">)</span> root:/# <span class="nb">cd</span> /usr/milis/mps
<span class="o">(</span>temel<span class="o">)</span> root:/# <span class="nb">echo</span> <span class="s2">&quot;export MPS_PATH=/usr/milis/mps&quot;</span> &gt;&gt; /root/.bashrc
<span class="o">(</span>temel<span class="o">)</span> root:/# <span class="nb">echo</span> <span class="s2">&quot;export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:\$MPS_PATH/bin&quot;</span> &gt;&gt; /root/.bashrc
<span class="o">(</span>temel<span class="o">)</span> root:/# <span class="nb">source</span> /root/.bashrc
<span class="o">(</span>temel<span class="o">)</span> root:/# sh derle.sh

<span class="c1"># sürüm numarası alınarak MPS kurulum doğrulanır.</span>
<span class="c1"># mps -v</span>
<span class="m">2</span>.0.0

<span class="c1"># bashrc profile kopyalanarak chroot ortamdan çıkış yapılır.</span>
cp /root/.bashrc /etc/profile
<span class="nb">exit</span>
</pre></div>
</div>
<ol class="arabic simple" start="16">
<li><p>İmaj üreticinin kullanılarak temel canlı imajın üretilmesi:</p></li>
</ol>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span> /home/mlfs
git clone https://notabug.org/milislinux/imaj-uretici-2

<span class="nb">cd</span> imaj-uretici-2
./iso_olustur.sh
</pre></div>
</div>
</div>


          </div>
        </div>
      </div>
    <a href="https://notabug.org/milislinux/belgeler">
        <img style="position: absolute; top: 0; right: 0; border: 0;" src="http://mls.akdeniz.edu.tr/belgeler/_static/fork.png" alt="Fork me on NotABug">
    </a>

      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
<p class="logo">
  <a href="../../index.html">
    <img class="logo" src="../../_static/logo.png" alt="Logo"/>
    
  </a>
</p>








<h3>Gezinti</h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="talimat.html">Talimat Sistemi</a></li>
<li class="toctree-l1"><a class="reference internal" href="mps_kurulum.html">Milis Kurulum Yönergeleri</a></li>
<li class="toctree-l1"><a class="reference internal" href="mps.html">Milis Paket Sistemi</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Sıfırdan Milis Linux Yapımı</a><ul class="simple">
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="mps_ile_iso_yapimi.html">Mps ile Milis Linux Yapımı</a></li>
<li class="toctree-l1"><a class="reference internal" href="miliste_paket_uretimi.html">Milis’te Paket Üretimi</a></li>
<li class="toctree-l1"><a class="reference internal" href="ortam_olusturma.html">Milis Ortamı Oluşturma</a></li>
</ul>

<div class="relations">
<h3>Related Topics</h3>
<ul>
  <li><a href="../../index.html">Documentation overview</a><ul>
      <li>Previous: <a href="mps.html" title="önceki bölüm">Milis Paket Sistemi</a></li>
      <li>Next: <a href="mps_ile_iso_yapimi.html" title="sonraki bölüm">Mps ile Milis Linux Yapımı</a></li>
  </ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Hızlı Arama</h3>
    <div class="searchformwrapper">
    <form class="search" action="../../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" />
      <input type="submit" value="Git" />
    </form>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="footer">
      &copy;2019, milislinux.
      
      |
      Powered by <a href="http://sphinx-doc.org/">Sphinx 2.1.2</a>
      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.8</a>
      
      |
      <a href="../../_sources/docs/tr/iso_yapimi.rst.txt"
          rel="nofollow">Page source</a>
    </div>

    

    
  </body>
</html>